package jsu.xnm.evelyn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.servlet.http.HttpServletRequest;
import jsu.xnm.evelyn.bean.Employee;
import jsu.xnm.evelyn.mapper.EmployeeMapper;
import jsu.xnm.evelyn.service.EmployeeService;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;


/**
 * @author xnm
 * @version 1.0
 */
@Service
public class EmployeeIServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService {

    @Override
    public void saveEmployee(Employee employee, Integer cuId) {
        //设置初始密码123456 todo md5加密
        employee.setPassword(DigestUtils.md5DigestAsHex("123456".getBytes()));
        this.save(employee);
    }
}
